package com.qf.controller;

import com.qf.pojo.User;
import com.qf.utils.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {


    @GetMapping("/findAll")
    public String findAll(){
        //需要当前登录的用户信息
        User user = SecurityContextHolder.getContext();
        return "查询全部成功 --" + user.getUsername() + "---" + user.getPassword();
    }
}
